﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;

namespace Win7Helper.Helper
{
    class ClickHelper
    {/// <summary>
    /// 点击打开浏览器的辅助类
    /// </summary>
    /// <param name="url"></param>
        public static void OpenWebBower(String url) {

            try
            {
                System.Diagnostics.Process.Start(url);
            }
            catch (Exception ex)
            {
                PrintLog.Log("报错链接" + StaticValue.PublicityLink);
                PrintLog.Log(ex);
            }
        }
        public static bool ThemeInstall() {
            String ThemePath= StaticValue.ThemeBin1 + "instatll.themepack";
            if (File.Exists(ThemePath)){
                try
                {
                    System.Diagnostics.Process.Start(ThemePath);
                    Console.WriteLine("执行了安装"+ ThemePath);
                    return true;
                }
                catch (Exception ex){
                    PrintLog.Log(ex);
                    StaticValue.ErrorTip = ex.Message;
                }
            }
            else{
                StaticValue.ErrorTip ="未找到主题文件";
            }
            return false;

        }
    }
}
